.class public Lcom/waiqin365/lightapp/view/EditViewSingleScan;
.super Lcom/waiqin365/lightapp/kehu/view/CMCustomView;

# interfaces
.implements Ljava/util/Observer;


# instance fields
.field private a:Landroid/content/Context;

.field private b:Landroid/view/View;

.field private c:Landroid/view/View;

.field private d:Landroid/view/View;

.field private e:Landroid/widget/TextView;

.field private f:Landroid/widget/EditText;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0, p1, v0}, Lcom/waiqin365/lightapp/kehu/view/CMCustomView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    invoke-direct {p0, p1}, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->a(Landroid/content/Context;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0

    invoke-direct {p0, p1, p2}, Lcom/waiqin365/lightapp/kehu/view/CMCustomView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    invoke-direct {p0, p1}, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->a(Landroid/content/Context;)V

    return-void
.end method

.method static synthetic a(Lcom/waiqin365/lightapp/view/EditViewSingleScan;)Landroid/widget/EditText;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->f:Landroid/widget/EditText;

    return-object v0
.end method

.method private a(Landroid/content/Context;)V
    .locals 4

    const/4 v3, -0x1

    iput-object p1, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->a:Landroid/content/Context;

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->a:Landroid/content/Context;

    const v1, 0x7f03013b

    const/4 v2, 0x0

    invoke-static {v0, v1, v2}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    const v0, 0x7f0c0748

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->b:Landroid/view/View;

    const v0, 0x7f0c0083

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->c:Landroid/view/View;

    const v0, 0x7f0c0096

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->d:Landroid/view/View;

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->d:Landroid/view/View;

    const/4 v2, 0x4

    invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->d:Landroid/view/View;

    const/4 v2, 0x0

    invoke-virtual {v0, v2}, Landroid/view/View;->setEnabled(Z)V

    const v0, 0x7f0c01ee

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->e:Landroid/widget/TextView;

    const v0, 0x7f0c0746

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->f:Landroid/widget/EditText;

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->f:Landroid/widget/EditText;

    new-instance v2, Lcom/waiqin365/lightapp/view/eg;

    invoke-direct {v2, p0}, Lcom/waiqin365/lightapp/view/eg;-><init>(Lcom/waiqin365/lightapp/view/EditViewSingleScan;)V

    invoke-virtual {v0, v2}, Landroid/widget/EditText;->addTextChangedListener(Landroid/text/TextWatcher;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->f:Landroid/widget/EditText;

    new-instance v2, Lcom/waiqin365/lightapp/view/eh;

    invoke-direct {v2, p0}, Lcom/waiqin365/lightapp/view/eh;-><init>(Lcom/waiqin365/lightapp/view/EditViewSingleScan;)V

    invoke-virtual {v0, v2}, Landroid/widget/EditText;->setOnFocusChangeListener(Landroid/view/View$OnFocusChangeListener;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->d:Landroid/view/View;

    new-instance v2, Lcom/waiqin365/lightapp/view/ei;

    invoke-direct {v2, p0}, Lcom/waiqin365/lightapp/view/ei;-><init>(Lcom/waiqin365/lightapp/view/EditViewSingleScan;)V

    invoke-virtual {v0, v2}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v0, 0x7f0c0747

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    new-instance v2, Lcom/waiqin365/lightapp/view/ej;

    invoke-direct {v2, p0}, Lcom/waiqin365/lightapp/view/ej;-><init>(Lcom/waiqin365/lightapp/view/EditViewSingleScan;)V

    invoke-virtual {v0, v2}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    new-instance v0, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v0, v3, v3}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {p0, v1, v0}, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    return-void
.end method

.method static synthetic b(Lcom/waiqin365/lightapp/view/EditViewSingleScan;)Landroid/view/View;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->d:Landroid/view/View;

    return-object v0
.end method

.method static synthetic c(Lcom/waiqin365/lightapp/view/EditViewSingleScan;)Landroid/content/Context;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->a:Landroid/content/Context;

    return-object v0
.end method


# virtual methods
.method public c()Ljava/lang/CharSequence;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->e:Landroid/widget/TextView;

    invoke-virtual {v0}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v0

    return-object v0
.end method

.method public d()Ljava/lang/CharSequence;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->f:Landroid/widget/EditText;

    invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v0

    return-object v0
.end method

.method protected onDetachedFromWindow()V
    .locals 1

    invoke-static {}, Lcom/waiqin365/lightapp/view/a/b;->a()Ljava/util/Observable;

    move-result-object v0

    invoke-virtual {v0, p0}, Ljava/util/Observable;->deleteObserver(Ljava/util/Observer;)V

    invoke-super {p0}, Lcom/waiqin365/lightapp/kehu/view/CMCustomView;->onDetachedFromWindow()V

    return-void
.end method

.method public setHint(Ljava/lang/CharSequence;)V
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->f:Landroid/widget/EditText;

    invoke-virtual {v0, p1}, Landroid/widget/EditText;->setHint(Ljava/lang/CharSequence;)V

    return-void
.end method

.method public setLabel(Ljava/lang/CharSequence;)V
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->e:Landroid/widget/TextView;

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    return-void
.end method

.method public setValue(Ljava/lang/String;)V
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->f:Landroid/widget/EditText;

    invoke-virtual {v0, p1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    return-void
.end method

.method public update(Ljava/util/Observable;Ljava/lang/Object;)V
    .locals 2

    if-eqz p2, :cond_0

    instance-of v0, p2, Lcom/waiqin365/lightapp/view/a/a;

    if-eqz v0, :cond_0

    iget-object v1, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->n:Ljava/lang/String;

    move-object v0, p2

    check-cast v0, Lcom/waiqin365/lightapp/view/a/a;

    iget-object v0, v0, Lcom/waiqin365/lightapp/view/a/a;->a:Ljava/lang/String;

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    move-object v0, p2

    check-cast v0, Lcom/waiqin365/lightapp/view/a/a;

    iget-object v0, v0, Lcom/waiqin365/lightapp/view/a/a;->b:Ljava/lang/Object;

    instance-of v0, v0, Landroid/content/Intent;

    if-eqz v0, :cond_0

    check-cast p2, Lcom/waiqin365/lightapp/view/a/a;

    iget-object v0, p2, Lcom/waiqin365/lightapp/view/a/a;->b:Ljava/lang/Object;

    check-cast v0, Landroid/content/Intent;

    invoke-static {}, Lcom/waiqin365/lightapp/view/a/b;->a()Ljava/util/Observable;

    move-result-object v1

    invoke-virtual {v1, p0}, Ljava/util/Observable;->deleteObserver(Ljava/util/Observer;)V

    if-eqz v0, :cond_0

    const-string/jumbo v1, "qrResult"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getBundleExtra(Ljava/lang/String;)Landroid/os/Bundle;

    move-result-object v0

    const-string/jumbo v1, "result"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/view/EditViewSingleScan;->f:Landroid/widget/EditText;

    invoke-virtual {v1, v0}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    :cond_0
    return-void
.end method
